{extend name="iframe" /}

{block name="body"}
<form method="post" class="editData layui-form xn_ajax2" data-type="open" action="edit.html">
    <input type="hidden" name="id" value="{$data.id}">

    <div class="layui-form-item">
            <label class="layui-form-label">用户名</label>
            <div class="layui-input-inline">
                <input type="text" name="username" lay-verify="required" placeholder="" autocomplete="off" class="layui-input" value="{$data.username}">
            </div>
            <div class="layui-form-mid layui-word-aux"></div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">头像</label>
            <div class="layui-input-block">
                {:xn_upload_one($data.headimg,'headimg')}
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">昵称</label>
            <div class="layui-input-inline">
                <textarea id="layui_textarea" name="nickname" placeholder="请输入昵称" class="layui-textarea">{$data.nickname}</textarea>
            </div>
        </div>
  <div class="layui-form-item">
    <label class="layui-form-label">级别</label>
    <div class="layui-input-block">
     {foreach name="roleList" item="vo" key="key"}
      <input type="radio" name="role" value="{$key}" title="{$vo}" {if $data[role] ==$key }checked{/if} >
      {/foreach}
    </div>
  </div>
    <div class="layui-form-item">
        <label class="layui-form-label">状态</label>
        <div class="layui-input-inline">
            <input type="hidden" name="status" value="0">
            <input type="checkbox" lay-verify="required" lay-filter="status" name="status" lay-skin="switch" lay-text="开|关" value="1" {if $data[status] ==1 }checked{/if}  >
        </div>
        <div class="layui-form-mid layui-word-aux"></div>
    </div>


    <div class="layui-form-item">
        <div class="layui-input-block">
            <button type="submit" lay-filter="save" lay-submit class="layui-btn">保存</button>
        </div>
    </div>
</form>
{/block}
